function SuperType(name){
    this.name = name;
    this.color = ['red','blue','yellow']
}
SuperType.prototype.sayName = function(){
    console.log(this.name)
}
function SubType(name,age){
    SuperType.call(this,name)
    this.age = age
}
SubType.prototype = new SuperType()
SubType.prototype.constructor = SubType;
SubType.prototype.sayAge = function(){
    console.log(this.age)
}
var per1 = new SubType('moyu',23)
per1.color.push('black')
console.log(per1.color)
per1.sayName()
per1.sayAge()

var per2 = new SubType('momo',18)
console.log(per2.color)
per2.sayName()
per2.sayAge()

